import { GetRequest, PostRequest } from '@/utils/request'
import type { Response } from '@/utils/request'
export type ImageList = {
  imagekey: string
  previewimagekey: string
  key: string
  timestamp: string
}
interface imgeGroup {
  images: ImageList[]
}
export async function getImagesGroup(haid: string): Promise<Response<imgeGroup>> {
  return GetRequest(`/api/homeappliances/${haid}/images`)
}
export function getImagesInfo(haid: string, key: string) {
  return GetRequest(
    `/api/homeappliances/${haid}/images/${key}`,
    {},
    {
      header: {
        Accept: 'image/*',
      },
      responseType: 'arraybuffer',
    }
  )
}
